package com.go10.catalog.common;

public class ServiceMessage<T> {
private int status;
private String message;
private T data;
public int getStatus() {
	return status;
}

public void setStatus(int status) {
	this.status = status;
}
public String getMessage() {
	return message;
}
public void setMessage(String message) {
	this.message = message;
}
public T getData() {
	return data;
}
public void setData(T data) {
	this.data = data;
}

public ServiceMessage(int status, String message, T data) {
	super();
	this.status = status;
	this.message = message;
	this.data = data;
}
public static <T>ServiceMessage<T> ok()//成功返回的 方法
{
	return ServiceMessage.ok(null);
}
public static <T>ServiceMessage<T> ok(T data)//成功返回的 方法
{
	return new ServiceMessage<T>(200,"ok",data);
}
public static <T>ServiceMessage<T> error()//成功返回的 方法
{
	return new ServiceMessage<T>(500,"error",null);
}
}
